using System;
using System.Globalization;
#if NETFX_CORE || UNIVERSAL
using Windows.UI.Xaml;
#else
using System.Windows;
#endif



namespace Prometheus.Binding.ReadOnly.BaseConverters
{
    public class proBoolToVisibilityConverter : proChainConverter
    {
        public override object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return (bool) value ? Visibility.Visible : Visibility.Collapsed;
        }

        public override object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            return (Visibility) value == Visibility.Visible;
        }
    }
}